<?php
/**
 * Menu of pages in rs.
 *
 * @author dll_hell_2
 */
class menu {
    protected $items;
    protected $css_name;
    public function __construct($items, $css_name) {
        $this->items = $items;
        $this->css_name = $css_name;
    }
    /**
     *Prints menu items as unordered list.
     * @return string Final html code.
     */
    public function __toString()
    {
        $result = '<div id="'.$this->css_name.'">';
        $result .='<ul>';
        foreach($this->items as $key => $val)
        {
            
            $result .= '<li>'.$val.'</li>';
        }
        $result .='</ul>';
        $result .= '</div>';
        return $result;
    }
}

?>
